﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{
    public partial class operatorInfoManager
    {

        public bool Login(string account, string pwd)
        {
            operatorInfo opInfo = db.GetAll().Where(p => p.username == account && p.password == pwd).FirstOrDefault();
            if (opInfo != null)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public string getRoleId(string account)
        {
            string roleId =db.GetAll().Where(p=>p.username==account).FirstOrDefault().roleId.ToString();
            return roleId;
        }
    }
}
